package base_demo.waitandnotify2;

import java.util.concurrent.ArrayBlockingQueue;

public class Demo {
    public static void main(String[] args) {

        //阻塞队列
        //1.创建队列并设置最大值
        ArrayBlockingQueue<String> queue = new ArrayBlockingQueue<>(5);
        //2.创建线程运行即可
        Cook c = new Cook(queue);
        Foodie f = new Foodie(queue);

        //开启线程
        c.start();
        f.start();


    }
}
